package cn.meal.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 公共实体属性
 */
@Data
public class BaseEntity {


    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;
    //    创建人id
    private Integer createBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;
    //    修改人id
    private Integer updateBy;
    //    0未删除  1删除
    @ApiModelProperty(value = "逻辑删除(1:已删除，0:未删除)")
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;
}
